Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for enhancement of Stake Manager contracts #281

Merged
merged 9 commits into from
Aug 2, 2023

Conversation

drinkcoffee
Copy link
Contributor

This PR prepares StakeManager for enhancement and upgrade. This PR:

  • Convert StakeManagerLib and ChildChainLib to abstract contracts, and moves them to the root/staking directory
  • Adds storage gaps for these contracts.
  • Improves the documentation.

wschwab and others added 2 commits May 15, 2023 20:37
…xPolygon#236)

* build(deps-dev): bump @types/node from 20.1.1 to 20.1.3

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.1.1 to 20.1.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* feat: implement mintable token predicate contracts (0xPolygon#234)

* feat: add ERC20 mintable predicates

* test: add tests for root mintable ERC20 predicate

* fix: mintable root erc20 predicate fixes

* test: implement tests for child mintable erc20 predicate

* feat: implement root mintable ERC721 predicate

* feat: implement child mintable erc721 predicate

* test: implement child mintable erc721 tests

* test: implement root mintable erc721 predicate tests

* feat: implement child mintable erc1155 predicate

* feat: implement root mintable erc1155 predicate

* test: implement root mintable erc1155 predicate tests

* chore: minor doc fixes, fix slither

* build(deps-dev): bump @openzeppelin/hardhat-upgrades

Bumps [@openzeppelin/hardhat-upgrades](https://github.com/OpenZeppelin/openzeppelin-upgrades) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-upgrades/releases)
- [Commits](https://github.com/OpenZeppelin/openzeppelin-upgrades/compare/@openzeppelin/[email protected]...@openzeppelin/[email protected])

---
updated-dependencies:
- dependency-name: "@openzeppelin/hardhat-upgrades"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: qedk <[email protected]>
Co-authored-by: Daniel Gretzke <[email protected]>
Copy link
Contributor

@QEDK QEDK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes, I don't see why we need a storage gap this big with mappings, the chance of the collision is dependent on keccak, so it can always collide with newer mappings or variables, but quite unlikely.

contracts/root/staking/StakeManagerChildData.sol Outdated Show resolved Hide resolved
contracts/root/staking/StakeManagerChildData.sol Outdated Show resolved Hide resolved
contracts/root/staking/StakeManagerStakingData.sol Outdated Show resolved Hide resolved
contracts/root/staking/StakeManagerStakingData.sol Outdated Show resolved Hide resolved
contracts/root/staking/StakeManager.sol Outdated Show resolved Hide resolved
@QEDK QEDK changed the base branch from main to dev July 6, 2023 09:37
@QEDK
Copy link
Contributor

QEDK commented Jul 6, 2023

@drinkcoffee can you base your branch off dev that is the latest version of contracts we have now.

@drinkcoffee
Copy link
Contributor Author

@drinkcoffee can you base your branch off dev that is the latest version of contracts we have now.

I will aim to get that done on Monday.

@QEDK
Copy link
Contributor

QEDK commented Jul 14, 2023

@drinkcoffee there is one remaining conflict, can you resolve that too, ty!

@drinkcoffee
Copy link
Contributor Author

I have re-merged origin/dev . I can't see any conflicts. Hopefully, it is now ready to merge.

@drinkcoffee
Copy link
Contributor Author

Are any future changes required?

@drinkcoffee drinkcoffee requested a review from QEDK July 19, 2023 22:00
@gretzke
Copy link
Contributor

gretzke commented Aug 2, 2023

Slither and coverage would need to be fixed before merging into dev

@gretzke gretzke changed the base branch from dev to storage-gaps August 2, 2023 15:37
@drinkcoffee
Copy link
Contributor Author

I have fixed the slither issues. I am not sure how to fix the coverage issue "Error in plugin solidity-coverage: TypeError: provider.send is not a function". Looking at Stack Overflow, this appears to be a versioning issue between Hardhat and Solidity.

@gretzke
Copy link
Contributor

gretzke commented Aug 2, 2023

thanks, I will merge and investigate myself

@gretzke gretzke merged commit 942dbf9 into 0xPolygon:storage-gaps Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants